package com.gomore.opple.module.addcustomer;


import com.gomore.opple.BasePresenter;
import com.gomore.opple.BaseView;
import com.gomore.opple.model.StoreAddress;
import com.gomore.opple.web.cgform.app.entity.TOAppversionEntity;
import com.gomore.opple.web.cgform.consumer.entity.TOConsumerEntity;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;

public interface AddConsumerContract {

    interface View extends BaseView<Presenter> {

        /**
         * 显示进度条
         */
        void showProgressDialog();

        /**
         * 隐藏进度条
         */
        void hideProgressDialog();

        /**
         * 展示消息
         *
         * @param msg 消息
         */
        void showMessage(String msg);

        /**
         * 跳转到主界面
         */
        void goBack(String consumerId);

        /**
         * 展示消息
         *
         * @param msgId 消息id
         */
        void showMessage(int msgId);

        /**
         * 设置头像url
         */
        void setUrl(String icon_url);

        /**
         * 显示门店默认地址
         */
        void setStoreAddress(StoreAddress storeAddress);

    }

    interface Presenter extends BasePresenter {

        /**
         * 准备初始化数据
         */
        void prepareInitData();

        /**
         * 保存客户
         */
        void save(TOConsumerEntity toConsumerEntity, boolean isCreateConsumer);

        /**
         * 保存当前客户收货地址
         */
        void saveAddress(TOConsumerEntity toConsumerEntity, String consumerId);

        /**
         * 保存附件
         *
         * @param file
         */
        void saveAttachment(MultipartBody.Part file);
    }
}
